/*
#ifndef __GRAPH_MOVABLE_H__
#define __GRAPH_MOVABLE_H__

#include "T_Layer.h"

class GraphMovable:public T_Layer{
protected:
	int fromX,fromY;
	int cutWidth,cutHeight;
	int imageWidth,imageHeight;

public:
	GraphMovable(){
		fromX=fromY=0;
		cutWidth=cutHeight=0;
		imageHeight=imageWidth=0;
	}
	
	virtual void genCutArea()=0;

	virtual void setSize(int w,int h){
		T_Layer::setSize(w,h);
		genCutArea();
	}

	void moveImg(int xPlus,int yPlus){
		int nextX=xPlus+fromX,nextY=yPlus+fromY;
		if(nextX<1)nextX=0;
		else if(nextX>imageWidth-cutWidth)nextX=imageWidth-cutWidth;
		if(nextY<1)nextY=0;
		else if(nextY>imageHeight-cutHeight)nextY=imageHeight-cutHeight;

		fromX=nextX,fromY=nextY;
	}

	void g_center(){
		if( !cutWidth || !cutHeight)return;

		fromX=(imageWidth-cutWidth)/2;
		fromY=(imageHeight-cutHeight)/2;
	}

	void g_bottom(){
		if( !cutWidth || !cutHeight)return;
		fromY=imageHeight-cutHeight;
	}

	void g_top(){
		if( !cutWidth || !cutHeight)return;
		fromY=0;
	}

	void g_left(){
		if( !cutWidth || !cutHeight)return;
		fromX=0;
	}

	void g_right(){
		if( !cutWidth || !cutHeight)return;
		fromX=imageWidth-cutWidth;
	}

	void g_verticalCenter(){
		if( !cutWidth || !cutHeight)return;
		fromY=(imageHeight-cutHeight)/2;
	}

	void g_horizontalCenter(){
		if( !cutWidth || !cutHeight)return;
		fromX=(imageWidth-cutWidth)/2;
	}
};


#endif
*/